package com.itheima.Test002;

public class Demo02 {
    public static void main(String[] args) {
        //根据student类来创建两个对象;
        Student stu= new Student("张三",'男',17);
        Student stu2= new Student("李四",'女',18);
        System.out.println(stu.equals(stu2));
        Student stu3 = new Student("王五",'女',20);
        Student stu4 = new Student("王五",'女',20);
        System.out.println(stu3.equals(stu4));

    }

    private static void method() {
        Student stu =  new Student("张三",'男',18);
        Student stu1 =  new Student("李四",'女',16);
        System.out.println(stu.equals(stu1));
        Student stu3 =  new Student("王五",'男',18);
        Student stu4 =  new Student("王五",'男',18);
        System.out.println(stu3.equals(stu4));
    }
}
